package com.struct.factory
{
	import com.struct.graph.game2.Battle2GraphWorker;
	import com.struct.graph.game2.ui.Battle2Frame;
	
	import sacu.s.Factory;
	
	public class Battle2Factory extends Factory
	{
		public var battleGW:Battle2GraphWorker;
		public var battle:Battle2Frame;
		public function Battle2Factory(Name:String)
		{
			super(Name);
		}override protected function onInitFactory():void{
			super.onInitFactory();
			
			battle = new Battle2Frame();
			battleGW = new Battle2GraphWorker("Battle2GraphWorker", battle);
		}
		
		override protected function onStartFactory():void{
			registerGraphicsWorker(battleGW);
			SSA.application.mapLayer.addChild(battle);
		}
		override public function disposeFactory():void{
			super.disposeFactory();
			
			removeGraphicsWorker(battleGW.eName);
			SSA.application.mapLayer.removeChild(battle);
		}
	}
}